package cn.edu.buaa.nlsde.mpj.fw.invoker.loader;

import cn.edu.buaa.nlsde.mpj.fw.model.input.Input;
import org.dom4j.Element;

public class InputResolver extends VariableResolver {
    public Input resolve(Element element) {
        log.info("开始构建输入变量" + element.attributeValue("name") + "。");
        Input input = new Input();
        //输入只需要设置name和type就可以了
        input.setName(element.attribute("name").getText());
        input.setType(element.element("type").getTextTrim());
        input.setValue(null);
        log.info("构建输入变量" + element.attributeValue("name") + "结束。");
        return input;
    }
}
